package com.edu.bean;

import org.springframework.stereotype.Component;

/**
 * @Author:wsc
 * @Date:2025/11/5-02:20-18
 */
@Component
public class Student {
    private int stuId;
    private int stuAge;
    public String stuName;

    private void introduce(){
        System.out.println("学生的基本信息"+stuId+"/"+stuAge+"/"+stuName);
    }
    public void greeting(String sth,int times){
        for (int i = 0; i < times; i++) {
            System.out.println(stuName+"说"+sth);
        }
    }

    private Student() {

    }

    public Student(int stuId, int stuAge, String stuName) {
        this.stuId = stuId;
        this.stuAge = stuAge;
        this.stuName = stuName;
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuId=" + stuId +
                ", stuAge=" + stuAge +
                ", stuName='" + stuName + '\'' +
                '}';
    }
}
